﻿@{
   Layout = null;
}

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<title>@ElingOA6_Admin_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
<link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/ntko.js", true)" type="text/javascript"></script>

</head>
<body onload='editoffice("@ViewData["url"]","1");'>    
    <div>

            <script>
                //var ServerUrl = "<%=ServerUrl%>";
                var ProductCaption = '@ViewData["ProductCaption"]';
                var ProductKey = '@ViewData["ProductKey"]';
            </script>

            <script src="@Url.Content("~/Scripts/ntkoofficecontrol.js", true)" type="text/javascript"></script>
            <!--控件事件代码开始-->

            <script type="text/javascript" language="JScript" for="TANGER_OCX" event="OnFileCommand(cmd,canceled);">
	                alert(cmd);
	                CancelLastCommand=true;
            </script>

            <script type="text/javascript" language="JScript" for="TANGER_OCX" event="OnDocumentClosed();">
	                setFileOpenedOrClosed(false);
            </script>

            <script type="text/javascript" language="JScript" for="TANGER_OCX" event="OnDocumentOpened(TANGER_OCX_str,TANGER_OCX_obj);">
                     //TANGER_OCX_OBJ.SetReadOnly(true);//文件只读保护,setreadonly方法
                     TANGER_OCX_OBJ.ToolBars = false;		       
            </script>

            <script type="text/javascript" language="JScript" for="TANGER_OCX" event="BeforeOriginalMenuCommand(TANGER_OCX_str,TANGER_OCX_obj);">
	                alert("BeforeOriginalMenuCommand事件被触发");
            </script>

            <script type="text/javascript" language="JScript" for="TANGER_OCX" event="OnFileCommand(TANGER_OCX_str,TANGER_OCX_obj);">
	                if (TANGER_OCX_str == 3) 
	                {
		                alert("不能保存！");
		                CancelLastCommand = true;
	                }
            </script>

            <script language="JScript" for="TANGER_OCX" event="OnCustomMenuCmd2(menuPos,submenuPos,subsubmenuPos,menuCaption,menuID)">
		            //alert("第" + menuPos +","+ submenuPos +","+ subsubmenuPos +"个菜单项,menuID="+menuID+",菜单标题为\""+menuCaption+"\"的命令被执行.");
		            if("全网页查看"==menuCaption)objside();
		            if("恢复原大小"==menuCaption)objside2();
            </script>

            <script type="text/javascript" language="JScript" for="TANGER_OCX" event="AfterPublishAsPDFToURL(result,code);">
	                result=trim(result);
	                alert(result);
	                if(result=="succeed")
	                {window.close();}
            </script>

            <!--控件事件代码结束-->
        </div>

</body>
</html>